var mysql = require('mysql');
var pool  = mysql.createPool({
  connectionLimit : 10,
  host            : 'localhost',
  user            : 'root',
  password        : '025813',
  database        : 'text'
});
const query=async(sql,parmas)=>{
    return await new Promise((resolve, reject) => {
        pool.query(sql,parmas, function (error, results, fields) {
            if (error) {
                reject(error)
            }else{
                resolve(results)
            }
          });
    })
}
 module.exports=query